home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Hot Mix 14
/
Hot Mix 14.iso
/
HTML
/
vendors
/
finesse
/
examples
/
examples_sh
< prev
Wrap
Text File
|
1996-06-27
|
2KB
|
72 lines
#! /bin/sh
# FINESSEAPPLICATIONKEY sEClCi?FSj`iJ
# sh script initialization
. ${FINESSEPATH-/usr/local/finesse}/fsshinit
examplespath=${FINESSEPATH-/usr/local/finesse}/examples
shdir=$examplespath/sh
XUSERFILESEARCHPATH=\
$examplespath/app-defaults/%N:$XUSERFILESEARCHPATH
export XUSERFILESEARCHPATH
display_example()
{
Fsecho -e; Fsecho -f $1 -p beginning -r 10 -c 80
}
# define examples and main window
nrows=4; ftag=f; ctag=ck
j=0; k=0
examples="FsForm -name mainform;"
for i in `ls $shdir`
do
k=`expr $j / $nrows`
if expr $j % $nrows > /dev/null
then
formvar=
else
formvar="FsForm -name $ftag$k
-orientation horizontal
-parent mainform;"
fi
examples="$examples $formvar
FsForm -name $ftag$i -parent $ftag$k;
FsPushButton -label $i -parent $ftag$i
-name $i -winstat touch;
FsCheck -var $ctag$i -items 'x'
-name $ctag$i -parent $ftag$i
-fsbutton $ctag$i -winstat touch;"
rmcklabel="$rmcklabel -r $ctag$i[3]:labelString:"
j=`expr $j + 1`
done
mainwin="
FsWindow -name main;
$examples
FsSeparator;
FsPushButton -label OK;"
# Finesse dialog
Fsopen
display_example $examplespath/`basename $0`
Fsdisplay -w "$mainwin" $rmcklabel
while :
do
case $fsbutton in
OK|a) break;;
$ctag*) updtck= ;;
*) display_example $shdir/$fsbutton
updtck="-r $ctag$fsbutton[3]:set:True"
(unset FSREADFILE FSWRITEFILE;
$shdir/$fsbutton);;
esac
Fsdisplay -n main $updtck
done
Fssave
Fsclose